using MyHomeworkWebAPi.Models.ef;
using MyHomeworkWebAPi.Models.Request;

namespace MyHomeworkWebAPi.Services
{
    /// <summary>
    /// 消息服务接口
    /// </summary>
    public interface IMessageServices
    {
        /// <summary>
        /// 获取所有消息
        /// </summary>
        Task<List<Message>> GetAllAsync();

        /// <summary>
        /// 根据ID获取消息
        /// </summary>
        Task<Message?> GetByIdAsync(Guid messageId);

        /// <summary>
        /// 创建消息
        /// </summary>
        Task<Message> CreateAsync(MessageCreateRequest request);

        /// <summary>
        /// 删除消息
        /// </summary>
        Task<bool> DeleteAsync(Guid messageId);

        /// <summary>
        /// 获取用户的消息列表
        /// </summary>
        Task<List<Message>> GetByUserIdAsync(Guid userId);

        /// <summary>
        /// 标记消息为已读
        /// </summary>
        Task<Message> MarkAsReadAsync(Guid messageId);

        /// <summary>
        /// 获取用户未读消息数量
        /// </summary>
        Task<int> GetUnreadCountAsync(Guid userId);
    }
} 